console.log(typeof null);
console.log(null instanceof Object);
console.log(Array instanceof Object);
let object = new Object();
console.log(typeof object); // 构造函数

console.log("a" + 1);
let temp = 3;
// console.log(temp--);
// console.log(temp);

console.log(temp-- == 3);

function greetingMaker(greeting) {
  function addName(name) {
    greeting = greeting.split(" ").reverse().join("-");
    return greeting + " " + name;
  }

  return addName;
}

var daytimeGreeting = greetingMaker("Good Day to you");
console.log(daytimeGreeting());

function a() {}
console.log(typeof NaN);

console.log(-1 == false);
console.log(-1 == true);
console.log(Math.sqrt(8));

console.log("" == false);

let obj1 = {
  a: 1,
  foo: () => {
    console.log(this.a);
  },
};
// log1
obj1.foo();
const obj2 = obj1.foo;
// log2
obj2();

console.log(undefined == false);
console.log(Number("  "));
